<?php
/**
 * Created by PhpStorm.
 * User: 94004
 * Date: 2017/12/29
 * Time: 15:58
 */
header("Content-Type:text/html;charset=utf-8;");
require_once "../util/db_helper.php";
$id = $_POST["ID"];
unset($_POST["ID"]);
$res = update("users",$_POST,$id);
$arr = array("code" => 101, "msg" => "更新失败");
if ($res) {
    $arr["code"] = 100;
    $arr["msg"] = "更新成功";
}
echo json_encode($arr, JSON_UNESCAPED_UNICODE);
?>